import 'package:flutter/material.dart';

class Person {
  late String title;
  late String label;
  Person({required this.title, required this.label});
}

class HomeContent2 extends StatelessWidget {
  const HomeContent2({super.key});
  @override
  Widget build(BuildContext context) {
    return Container(
        constraints: const BoxConstraints.expand(),
        child: Column(
          children: [
            Expanded(
              child: Wrap(
                spacing: 8.0,
                runSpacing: 4.0,
                children: [
                  Person(title: "AH", label: "Hamilton"),
                  Person(title: "ML", label: "Lafayette"),
                  Person(title: "HM", label: "Mulligan"),
                  Person(title: "JL", label: "Laurens"),
                ]
                    .map(
                      (Person e) => FilterChip(
                        padding: const EdgeInsets.only(left: 5.0),
                        labelPadding: const EdgeInsets.only(left: 5.0),
                        avatar: CircleAvatar(
                          backgroundColor: Colors.blue.shade900,
                          child: Text(e.title),
                        ),
                        label: Text(e.label),
                        onSelected: (value) {},
                      ),
                    )
                    .toList(),
              ),
            )
          ],
        ));
  }
}
